# -------------------------------------------------
# DEMOENGINE_ROOT/SRC/CmakeLists.txt 
# -------------------------------------------------

###################################################
PROJECT(demoEngine)

SET(PROJECT_SRCS 
  camera.cpp
  camera.h
  defaultmanipulator.cpp 
  defaultmanipulator.h
  export.h
  gizmos.cpp
  gizmos.h
  manipulator.cpp  
  manipulator.h
  node.cpp
  node.h
  quat
  quat.h
  text.cpp
  text.h
  vec.cpp
  vec.h
  viewer.cpp
  viewer.h
  morph.cpp
  morph.h
)

###################################################
# DEFINITIONS
ADD_DEFINITIONS( -DDENG_LIBRARY )

###################################################
# include
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIR}  )

###################################################
# libs PATH
LINK_DIRECTORIES(${OSG_LIB_DIR} )

###################################################
# EXE
  ADD_LIBRARY(${PROJECT_NAME} SHARED ${PROJECT_SRCS} )
# ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${PROJECT_SRCS} )
# ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SRCS} )
###################################################
# libs to link
SET(PROJECT_LIBS

  debug glu32.lib 
  debug opengl32.lib 
  debug openthreadsd.lib
  debug osgd.lib 
  debug osgDBd.lib 
  debug osgGAd.lib 
  debug osgTextd.lib 
  debug osgUtild.lib 
  debug osgViewerd.lib 
  debug osgManipulatord.lib 

  optimized glu32.lib 
  optimized opengl32.lib 
  optimized openthreads.lib
  optimized osg.lib 
  optimized osgDB.lib 
  optimized osgGA.lib 
  optimized osgText.lib 
  optimized osgUtil.lib 
  optimized osgViewer.lib 
  optimized osgManipulator.lib 
)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PROJECT_LIBS})

########################################################
#GET_TARGET_PROPERTY(TARGET_FULL_PATH ${PROJECT_NAME} LOCATION)
#MESSAGE("-->${TARGET_FULL_PATH}<--") 

#GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_FULL_PATH} PATH )
#MESSAGE("-->${TARGET_PATH}<--") 
#MESSAGE("-->${TARGET_FILENAME}<--") 

#ADD_CUSTOM_COMMAND(
#    TARGET ${PROJECT_NAME}
#    POST_BUILD
#    COMMAND ${CMAKE_COMMAND} -E copy ${TARGET_FULL_PATH} ${PYTHON_SITE_PACKAGES}/demoEnginePython/${TARGET_FILENAME}
#)    

INSTALL(  TARGETS ${PROJECT_NAME}  DESTINATION ${INST_DIR} )
    